import {defHttp} from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";

const { createConfirm } = useMessage();

enum Api {
  list = '/reconciliation/policySettlementTypeStatistics/list',
  processPolicySettlement='/reconciliation/policySettlementTypeStatistics/processPolicySettlement',
  selectCheck='/reconciliation/policySettlementTypeStatistics/selectCheck',
  addNote='/reconciliation/policySettlementTypeStatistics/addNote',
  exportXls = '/reconciliation/policySettlementTypeStatistics/checkExcel'
}

/**
 * 导出api
 * @param params
 */
export const getExportUrl = Api.exportXls;
/**
 * 列表接口
 * @param params
 */
export const list = (params) =>
  defHttp.get({url: Api.list, params});

/**
 * 删除单个
 */
export const processPolicySettlement = (params,handleSuccess) => {
  return defHttp.post({url: Api.processPolicySettlement, params}, {joinParamsToUrl: true}).then(() => {
    handleSuccess();
  });
}

/**
 * 删除单个
 */
export const selectCheck = (params) => {
  return defHttp.post({url: Api.selectCheck, params}, { isTransformResponse: false });
}

export const addNote = (params) => {
  return defHttp.post({url: Api.addNote, params}, { isTransformResponse: false });
}

